<?php
/**
 * Created by PhpStorm.
 * User: 郑好
 * Date: 2019/4/26
 * Time: 上午10:39
 */

namespace app\common;

class TimeMaker
{
    use InstanceTrait;

    public function beforeDaysStamp($day)
    {
        return mktime(0, 0, 0, date('m'), date('d')-$day, date('Y'));
    }

    public function lastWeekStamp()
    {
        return mktime(0, 0, 0, date('m'), date('d')-date('w')+1-7, date('Y'));
    }

    public function thisMonthStamp()
    {
        return mktime(0, 0, 0, date('m'), 1, date('Y'));
    }
}
